package com.qujia.station.controller;

import com.qujia.common.core.domain.ResultData;
import com.qujia.station.domain.AppUserSuperCopy;
import com.qujia.station.service.AppUserSuperCopyService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @date 2023/12/12
 */
@RestController
@RequestMapping(value = "/appUserSuperCopy")
public class AppUserSuperCopyController {

    @Resource
    private AppUserSuperCopyService appUserSuperCopyService;

    /**
     * 更新
     **/
    @PostMapping("/save")
    public ResultData save(@RequestBody AppUserSuperCopy appUserSuperCopy){
        appUserSuperCopyService.saveCopy(appUserSuperCopy);
        return ResultData.success();
    }

    /**
     * 查询
     **/
    @GetMapping("/getCopy")
    public ResultData<AppUserSuperCopy> getByEnterpriseId(){
        AppUserSuperCopy one = appUserSuperCopyService.getOneByUser();
        return ResultData.success(one);
    }

}
